package com.dhp.campus.Exception;


import com.dhp.campus.Common.ErrorCode;

public class exception extends RuntimeException{
    private String description;
    private Integer code;

    public exception(String description, Integer code , String message) {
        super(message);
        this.description = description;
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public Integer getCode() {
        return code;
    }

    public exception(ErrorCode errorCode) {
        super(errorCode.getMessage());
        this.description = errorCode.getDescription();
        this.code = errorCode.getCode();
    }

    public exception(ErrorCode errorCode , String description) {
        super(errorCode.getMessage());
        this.description = description;
        this.code = errorCode.getCode();
    }
}
